package main

import "fmt"

func main() {
	slice := []int{1, 2, 3, 4}

	slice2 := slice[:]

	slice2[0] = 10

	fmt.Println("slice2", slice2)
	fmt.Println("slice", slice)

	s := []int{1, 2, 3}
	fmt.Println("s", s)

	arr := [3]int{4, 5, 6}
	fmt.Println("arr", arr)

	s = arr[:]

	fmt.Println("s", s)

	arr[1] = 10

	fmt.Println("s", s)

	s = arr[1:]

	fmt.Println("s", s)

	s = arr[:1]

	fmt.Println("s", s)

	s2 := make([]int, 2)

	s2 = []int{1, 2}

	fmt.Println("s2", s2)

	s3 := []int{1, 2, 3}

	s4 := []int{4, 5, 6}

	copy(s3, s4)

	fmt.Println("s3", s3)

	s4[0] = 10
	fmt.Println("s3", s3)
}
